(function(){
    function formResult(msg, state) {
        if(state == 0) {
            layer.alert(msg, {icon: 2});
        }else {
            layer.alert(msg, {icon: 1},function(){
                parent.location.reload(true);
            });

        }
    }
    $(function(){
        window.formResult = formResult;
        $('.rest').click(function(){
            parent.layer.closeAll();
        })

    })

}());